
clear all 
use "replication_checked.dta", clear
///data cleaning///
*DV Info, Just, Change 
gen DV_euprev=. 
replace DV_euprev= 0 if question_1_demandpolicyviews==1| question_2demandinformation==1
replace DV_euprev= 1 if question_3demandjustification==1
replace DV_euprev= 2 if question_4demandchange==1 
label define DV_euprev 0 "information" 1 "justification" 2 "rectification"
tab DV_euprev

**Addressees**
gen addressee= "NA"
replace addressee="ECB" if addressee_ecb_ssmchair==1  
replace addressee= "EC" if addressee_europeancommission==1  
replace addressee="Ecofin" if addressee_ecofincouncil==1 
replace addressee="Eurogroup" if addressee_eurogroup ==1

***IVs***
*oversight relationship*
gen oversight=.
replace oversight=4.5 if  addressee== "EC"
replace oversight=3.5 if addressee== "ECB"
replace oversight=1 if addressee== "Ecofin"| addressee== "Eurogroup"
tab oversight 

*activity*
gen activity=0 if issue_type_executive==1 
replace activity=1 if issue_type_legislative==1 
label define activity 0 "executive" 1 "formulation"
tab activity 

***control variables
***gov/opp
gen govopp=1 if government==2
replace govopp=0 if government==0 | government==1
label define govopp 1 "government" 0 "opposition"
tab govopp

**gender**
encode gender, gen (gender_cat)

tab nationality
encode nationality, gen (nationality_cat)
tab nationality_cat 

gen status="creditor"
replace status= "debtor" if nationality_cat==8 |nationality_cat==4 |nationality_cat==15 |nationality_cat==22 |nationality_cat==10 |nationality_cat==16 
replace status="non-Eurozone" if nationality_cat==7 |nationality_cat==3 |nationality_cat==14 |nationality_cat==5 |nationality_cat==24 |nationality_cat==21 |nationality_cat==26 |nationality_cat==23 |nationality_cat==13
encode status, gen (status_cat)
tab status_cat 
*seniority 
tab s_value
rename s_value seniority 
tab seniority 

*** topic****
gen topic_new="NA" 
replace topic_new="banking union" if topic_banking_bankingandcapita==1
replace topic_new="capital shortfalls" if topic_banking_capitalshortfalls==1 
replace topic_new= "stress tests" if topic_banking_comprehensiveasse==1
replace topic_new="profits" if topic_banking_profitscompetiti==1
replace topic_new="banking resolution" if topic_banking_resolutionlikely==1
replace topic_new="monetary policy" if topic_ecbmonetarypolicydecisi==1
replace topic_new="Eurozone fiscal capacity" if topic_eurozonefiscalcapacitye==1
replace topic_new="budget deficit" if topic_eursem_budgetsdeficits==1
replace topic_new="growth" if topic_eursem_growthcsrsidrs==1
replace topic_new= "macroeconomic imbalances" if topic_eursem_macroeconomicimbal==1
replace topic_new="financial assistance" if topic_financialassistanceincl==1
replace topic_new="accountability" if topic_inst_accountability==1 
replace topic_new="Euroarea membership" if topic_inst_euroareamembership==1 
replace topic_new="investment" if  topic_social_investment==1
replace topic_new="unemployment" if topic_social_unemploymentpover==1 
replace topic_new= "taxation" if topic_taxationvatexpansionc==1 
replace topic_new= "tax havens" if topic_taxhavensmoneylaunder==1
encode topic_new, gen (topicnew_cat)

***MEP positioning***
tab pro_anti_eu 
tab left_right
**party group
encode epg, gen (group_cat)
tab group_cat

**Year 
tab year

//////////////////////////////////////////////////////////////////////////////////////////////////////////
**analysis and figures 

**Figure 1***

**Figure 1a **
graph bar (count), over(DV_euprev, relabel(1 "Information" 2 "Justification" 3 "Rectification"))  bar(1, color(gs11)) /// ///
    ytitle("Frequency of POs") ///
    ylabel(0(200)600, angle(horizontal)) ///
    name(fig_1a, replace)

** Figure 1b **
graph bar (count), over(addressee) over(DV_euprev, relabel(1 "Information" 2 "Justification" 3 "Rectification"))  bar(1, color(gs11)) /// ///
    ytitle("Frequency of POs") ///
	ylabel(0(100)200, angle(horizontal)) ///
	name(fig_1b, replace)

** combine figures  
graph combine fig_1a fig_1b, ///
  xcommon ///
    ysize(5) xsize(10) 
graph save fig_1_combined, replace

**Figure 2 
*Figure 2a
mlogit DV_euprev  i.activity oversight c.pro_anti_eu c.left_right   i.const_EU  i.gender_cat i.year i.topicnew_cat i.govopp i.status_cat i.group_cat sen_cat, robust baseoutcome (0)
margins, at (oversight=(1(0.5)5)) atmeans post predict(outcome(0)) noesample
marginsplot, saving (fig2a, replace)
*Figure 2b
mlogit DV_euprev  i.activity oversight c.pro_anti_eu c.left_right   i.const_EU  i.gender_cat i.year i.topicnew_cat i.govopp i.status_cat i.group_cat sen_cat, robust baseoutcome (1)
margins, at (oversight=(1(0.5)5)) atmeans post predict(outcome(1)) noesample
marginsplot, saving (fig2b, replace)
*Figure 2c 
mlogit DV_euprev  oversight c.pro_anti_eu c.left_right   i.const_EU  i.gender_cat i.year i.topicnew_cat i.govopp i.status_cat i.group_cat sen_cat, robust baseoutcome (2)
est store m3
margins, at (oversight=(1(0.5)5)) atmeans post predict(outcome(2)) noesample
marginsplot, saving (fig2c, replace)
***combine figures 
graph combine fig2a.gph fig2b.gph fig2c.gph
graph save fig2_combined, replace

**Figure 3
*Figure 3a
mlogit DV_euprev  i.activity oversight c.pro_anti_eu c.left_right   i.const_EU  i.gender_cat i.year i.topicnew_cat i.govopp i.status_cat i.group_cat sen_cat, robust baseoutcome (0)
margins, at(activity=(0 1 )) atmeans post predict(outcome(0)) noesample
marginsplot, graphregion(fcolor(white)) recast(scatter) ylabel(`xvarlabels')saving (fig3a, replace)
*Figure 3b 
mlogit DV_euprev  i.activity oversight c.pro_anti_eu c.left_right   i.const_EU  i.gender_cat i.year i.topicnew_cat i.govopp i.status_cat i.group_cat sen_cat, robust baseoutcome (1)
margins, at(activity=(0 1)) atmeans post predict(outcome(1)) noesample
marginsplot, graphregion(fcolor(white)) recast(scatter) ylabel(`xvarlabels')saving (fig3b, replace)
**Figure 3c
mlogit DV_euprev i.activity oversight c.pro_anti_eu c.left_right   i.const_EU  i.gender_cat i.year i.topicnew_cat i.govopp i.status_cat i.group_cat sen_cat, robust baseoutcome (2)
margins, at(activity=(0 1 )) atmeans post predict(outcome(2)) noesample
**Figure 3c
marginsplot, graphregion(fcolor(white)) recast(scatter) ylabel(`xvarlabels')saving (fig3c, replace)
**combine figures 
graph combine fig3a.gph fig3b.gph fig3c.gph
graph save fig3_combined, replace

**Online Appendix**

***Descriptive statistics for categorical variables 

** Figure A1: Type of PQs 
graph bar (count), over(DV_euprev, relabel(1 "Information" 2 "Justification" 3 "Rectification")) bar(1, color(gs11))  ///
    ytitle("Frequency") ///
    ylabel(0(200)600, angle(horizontal)) ///
    name(fig_A1, replace)
	graph save fig_A1, replace
	
**Firgure A2: Activity 
graph bar (count), over(activity, relabel(1 "Executive" 2 "Formulation" )) bar(1, color(gs11)) ///
    ytitle("Frequency") ///
    ylabel(0(200)1000, angle(horizontal)) ///
    name(fig_A2, replace)
	graph save fig_A2, replace

**Figure A3: Constituency focus 	
graph bar (count), over(const_EU, relabel(1 "National" 2 "EU" ))  bar(1, color(gs11)) ///
    ytitle("Frequency") ///
    ylabel(0(200)850, angle(horizontal)) ///
    name(fig_A3, replace)
	graph save fig_A3, replace
	
**Figure A4: Government and opposition 
	
graph bar (count), over(govopp, relabel(1 "Opposition" 2 "Government" ))  bar(1, color(gs11)) ///
    ytitle("Frequency") ///
    ylabel(0(200)1000, angle(horizontal)) ///
    name(fig_A4, replace)
	graph save fig_A4, replace

**Figure A5: Gender  	
graph bar (count), over(gender_cat, relabel(1 "Female" 2 "Male" ))  bar(1, color(gs11)) ///
    ytitle("Frequency") ///
    ylabel(0(200) 1000, angle(horizontal)) ///
    name(fig_A5, replace)
	graph save fig_A5, replace

**Figure A6: Country economic status  		
graph bar (count), over(status_cat, relabel(1 "Creditor" 2 "Debtor" 3 "Non-Eurozone" ))  bar(1, color(gs11)) ///
    ytitle("Frequency") ///
    ylabel(0(200) 800, angle(horizontal)) ///
    name(fig_A6, replace)
	graph save fig_A6, replace
	
**Figure A7: Topic 

graph bar (count), over(topicnew, sort(1))  bar(1, color(gs11)) ///
ytitle("Frequency") ///
ylabel(0(100)200, angle(45)) ///
name(fig_A7, replace)
graph save fig_A7, replace

**Figure A8: EP group 
graph bar (count), over (group_cat) bar(1, color(gs11)) ///
ytitle("Frequency") ///
name(fig_A8, replace)
graph save fig_A8, replace

**Figure A9: Year 
graph bar (count), over (year) bar(1, color(gs11)) ///
ytitle("Frequency") ///
name(fig_A9, replace)
graph save fig_A9, replace

**Descriptive Statistics of continuous variables
** Table 4: 
asdoc sum oversight seniority  pro_anti_eu left_right, replace

**Additional information on the dataset 
**Figure A10: Parliamentary questions by meeting 
graph bar (count), over (documentname) bar(1, color(gs11)) ///
 ytitle("Frequency of PQs") ///
name(fig_A10, replace) 
graph save fig_A10, replace

**Figure A11: Parliamentary questions by addressee
graph bar (count), over (addressee) bar(1, color(gs11)) ///
ytitle("Frequency of PQs") ///
name(fig_A11, replace)
graph save fig_A11, replace

**Figure A12: Main activity under scrutiny, by addressee
graph bar (count), over(addressee) over(activity, relabel (1 "executive" 2 "formulation" )) bar(1, color(gs11)) ///
    ytitle("Frequency of PQs") ///
	ylabel(0(100)300, angle(horizontal))
    graph save fig_A12, replace
	

****Table A5: Pairwise correlations of independent variables
asdoc pwcorr  oversight activity pro_anti_eu left_right group_cat status_cat const_EU gender_cat   year topicnew_cat govopp seniority  , sig 

***Analysis***
//TABLE A6
*H1 base outcome (0)*
mlogit DV_euprev  oversight c.pro_anti_eu c.left_right   i.const_EU  i.gender_cat i.year i.topicnew_cat i.govopp  i.status_cat i.group_cat sen_cat, robust baseoutcome (0) 
est store m1
**H1 Base outcome (1)
mlogit DV_euprev  oversight c.pro_anti_eu c.left_right  i.const_EU  i.gender_cat i.year i.topicnew_cat i.govopp i.status_cat i.group_cat sen_cat, robust baseoutcome (1)
est store m2
**H1 Base outcome (2)
mlogit DV_euprev  oversight c.pro_anti_eu c.left_right   i.const_EU  i.gender_cat i.year i.topicnew_cat i.govopp i.status_cat i.group_cat sen_cat, robust baseoutcome (2)
est store m3
*H2*
*H2 base outcome (0)
mlogit DV_euprev i.activity c.pro_anti_eu c.left_right  i.const_EU  i.gender_cat i.year i.topicnew_cat i.govopp i.status_cat i.group_cat sen_cat, robust  baseoutcome (0)
est store m4
*H2 base outcome (1) 
mlogit DV_euprev i.activity c.pro_anti_eu c.left_right   i.const_EU  i.gender_cat i.year i.topicnew_cat i.govopp i.status_cat i.group_cat sen_cat, robust  baseoutcome (1)
est store m5
*H2 base outcome (2)
mlogit DV_euprev i.activity c.pro_anti_eu c.left_right   i.const_EU  i.gender_cat i.year i.topicnew_cat i.govopp i.status_cat i.group_cat sen_cat, robust  baseoutcome (2)
est store m6
esttab  m1 m2 m3 m4 m5 m6 using regression_A6_check.rtf, se pr2 label  star(* 0.10 ** 0.05 *** 0.01) replace

///TABLE A7: summary regression/// 

** Base outcome (0)
mlogit DV_euprev  i.activity oversight c.pro_anti_eu c.left_right   i.const_EU  i.gender_cat i.year i.topicnew_cat i.govopp i.status_cat i.group_cat sen_cat, robust baseoutcome (0)
est store m1s
**Base outcome (1)
mlogit DV_euprev  i.activity oversight c.pro_anti_eu c.left_right  i.const_EU  i.gender_cat i.year i.topicnew_cat i.govopp i.status_cat i.group_cat sen_cat, robust baseoutcome (1)
est store m2s
**Base outcome (2)
mlogit DV_euprev  i.activity oversight c.pro_anti_eu c.left_right   i.const_EU  i.gender_cat i.year i.topicnew_cat i.govopp i.status_cat i.group_cat sen_cat, robust baseoutcome (2)
est store m3s

esttab  m1s m2s m3s using regression_summary_A7_check.rtf, se pr2 label  star(* 0.10 ** 0.05 *** 0.01) replace 



****Figure A13: Effect of constituency focus on type of PQ 
mlogit DV_euprev  i.activity oversight c.pro_anti_eu c.left_right   i.const_EU  i.gender_cat i.year i.topicnew_cat i.govopp i.group_cat sen_cat, robust
margins, at (const_EU=(0(1)1)) atmeans post noesample
marginsplot, graphregion(fcolor(white)) recast(scatter) ylabel(`xvarlabels')
graph save fig_A13, replace

**Figure A14: Effect of left-right dimension on type of PQ
mlogit DV_euprev  i.activity oversight c.pro_anti_eu c.left_right   i.const_EU  i.gender_cat i.year i.topicnew_cat i.govopp i.group_cat sen_cat, robust
quiet margins, at (left_right=(-29(1)26.9)) atmeans post noesample
marginsplot, graphregion(fcolor(white)) recast(scatter) ylabel(`xvarlabels')
graph save fig_A14, replace

**Figure A15: Effect of Pro/Anti EU dimension on type of PQ
mlogit DV_euprev  i.activity oversight c.pro_anti_eu c.left_right   i.const_EU  i.gender_cat i.year i.topicnew_cat i.govopp i.group_cat sen_cat, robust
quiet margins, at (pro_anti_eu=(-64(1)25)) atmeans post noesample
marginsplot, graphregion(fcolor(white)) recast(scatter) ylabel(`xvarlabels')
graph save fig_A15, replace


**Figure A16: Group Effects 
mlogit DV_euprev  i.activity oversight c.pro_anti_eu c.left_right   i.const_EU  i.gender_cat i.year i.topicnew_cat i.govopp i.group_cat sen_cat, robust
margins, at (group_cat=(1(1)9)) noesample
marginsplot, graphregion(fcolor(white)) recast(scatter) ylabel(`xvarlabels')
graph save fig_A16, replace

**Figure A17: Year Effects 
mlogit DV_euprev  i.activity oversight c.pro_anti_eu c.left_right   i.const_EU  i.gender_cat i.year i.topicnew_cat i.govopp i.group_cat sen_cat, robust
margins, at (year=(2014(1)2019)) atmeans post noesample
marginsplot, graphregion(fcolor(white)) recast(scatter) ylabel(`xvarlabels')
graph save fig_A17, replace

**Figure A18: Topic Effect  
mlogit DV_euprev  i.activity oversight c.pro_anti_eu c.left_right   i.const_EU  i.gender_cat i.year i.topicnew_cat i.govopp i.group_cat sen_cat, robust
margins, at (topic=(1(1)17)) atmeans post noesample
marginsplot, graphregion(fcolor(white)) recast(scatter) ylabel(`xvarlabels')
graph save fig_A18, replace

**Figure A19: Effect of oversight on PQ strength (no group effects) 
mlogit DV_euprev  oversight c.pro_anti_eu c.left_right   i.const_EU  i.gender_cat i.year i.topicnew_cat i.govopp  sen_cat, robust 
margins, at (oversight=(1(0.5)5)) atmeans post predict(outcome(0)) noesample 
marginsplot, saving (A19a, replace)
mlogit DV_euprev  oversight c.pro_anti_eu c.left_right   i.const_EU  i.gender_cat i.year i.topicnew_cat i.govopp  sen_cat, robust 
margins, at (oversight=(1(0.5)5)) atmeans post predict(outcome(1)) noesample 
marginsplot , saving (A19b, replace)
mlogit DV_euprev  oversight c.pro_anti_eu c.left_right   i.const_EU  i.gender_cat i.year i.topicnew_cat i.govopp  sen_cat, robust 
margins, at (oversight=(1(0.5)5)) atmeans post predict(outcome(2)) noesample  
marginsplot, saving (A19c, replace)
graph combine A19a.gph A19b.gph A19c.gph
graph save fig_A19, replace

**Figure A20: Effect of activity on PQ strength (model without group effects) 
mlogit DV_euprev i.activity c.pro_anti_eu c.left_right  i.const_EU  i.gender_cat i.year i.topicnew_cat i.govopp  sen_cat,robust  
margins, at(activity=(0 1)) atmeans post predict(outcome(0)) noesample
marginsplot, graphregion(fcolor(white)) recast(scatter) ylabel(`xvarlabels')saving (A20a, replace)

mlogit DV_euprev i.activity c.pro_anti_eu c.left_right  i.const_EU  i.gender_cat i.year i.topicnew_cat i.govopp  sen_cat,robust  
margins, at(activity=(0 1)) atmeans post predict(outcome(1)) noesample
marginsplot, graphregion(fcolor(white)) recast(scatter) ylabel(`xvarlabels')saving (A20b, replace)

mlogit DV_euprev i.activity c.pro_anti_eu c.left_right  i.const_EU  i.gender_cat i.year i.topicnew_cat i.govopp  sen_cat,robust  
margins, at(activity=(0 1)) atmeans post predict(outcome(2)) noesample
marginsplot, graphregion(fcolor(white)) recast(scatter) ylabel(`xvarlabels')saving (A20c, replace)

graph combine A20a.gph A20b.gph A20c.gph
graph save fig_A20, replace


***Figure A21: Effect of oversight on PQ strength (no left-right dimension)  
mlogit DV_euprev  oversight   i.const_EU  i.gender_cat i.year i.topicnew_cat i.govopp  i.group_cat sen_cat, robust
margins, at (oversight=(1(0.5)5)) atmeans post predict(outcome(0)) noesample 
marginsplot, saving (fig21a, replace)
mlogit DV_euprev  oversight   i.const_EU  i.gender_cat i.year i.topicnew_cat i.govopp  i.group_cat sen_cat, robust
margins, at (oversight=(1(0.5)5)) atmeans post predict(outcome(1)) noesample 
marginsplot, saving (fig21b, replace)
mlogit DV_euprev  oversight   i.const_EU  i.gender_cat i.year i.topicnew_cat i.govopp  i.group_cat sen_cat, robust
margins, at (oversight=(1(0.5)5)) atmeans post predict(outcome(2)) noesample 
marginsplot, saving (fig21c, replace)
graph combine fig21a.gph fig21b.gph fig21c.gph
graph save fig_A21, replace

***Figure A22: Effect of activity type on PQ strength (no left-right dimension)
mlogit DV_euprev i.activity  i.const_EU  i.gender_cat i.year i.topicnew_cat i.govopp  i.group_cat sen_cat, robust
margins, at(activity=(0 1)) atmeans post predict(outcome(0)) noesample
marginsplot, graphregion(fcolor(white)) recast(scatter) ylabel(`xvarlabels')saving (fig22a, replace)

mlogit DV_euprev i.activity  i.const_EU  i.gender_cat i.year i.topicnew_cat i.govopp  i.group_cat sen_cat, robust
margins, at(activity=(0 1)) atmeans post predict(outcome(1)) noesample
marginsplot, graphregion(fcolor(white)) recast(scatter) ylabel(`xvarlabels')saving (fig22b, replace)

mlogit DV_euprev i.activity  i.const_EU  i.gender_cat i.year i.topicnew_cat i.govopp  i.group_cat sen_cat, robust
margins, at(activity=(0 1)) atmeans post predict(outcome(2)) noesample
marginsplot, graphregion(fcolor(white)) recast(scatter) ylabel(`xvarlabels')saving (fig22c, replace)

graph combine fig22a.gph fig22b.gph fig22c.gph
graph save fig_A22, replace

***** Figure A23

gen dummy_oversight=0 if oversight<3.5  
replace  dummy_oversight=1 if oversight>1

mlogit DV_euprev  dummy_oversight c.pro_anti_eu c.left_right   i.const_EU  i.gender_cat i.year i.topicnew_cat i.govopp  i.status_cat i.group_cat sen_cat, robust baseoutcome (0)

margins, at (dummy_oversight=(0 1)) atmean post 
marginsplot, graphregion(fcolor(white)) recast(scatter) ///
    xlabel(0 "1" 1 ">1") ///
    ylabel(`xvarlabels') ///
    saving(fig_A23, replace)
	
**End***


